home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / checkbox / plugins / shell_prompt.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-10-12  |  1.3 KB  |  28 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from gettext import gettext as _
  5. from checkbox.lib.cache import cache
  6. from checkbox.plugin import Plugin
  7.  
  8. class ShellPrompt(Plugin):
  9.     
  10.     def register(self, manager):
  11.         super(ShellPrompt, self).register(manager)
  12.         self._manager.reactor.call_on('prompt-test-shell', self.prompt_test_shell)
  13.  
  14.     
  15.     def _run_shell(self, test):
  16.         result = test.command()
  17.         self._manager.reactor.fire('report-result', result)
  18.  
  19.     
  20.     def prompt_test_shell(self, interface, test):
  21.         if str(test.command):
  22.             interface.show_wait(_('Running shell tests...'), self._run_shell, test)
  23.         
  24.  
  25.     prompt_test_shell = cache(prompt_test_shell)
  26.  
  27. factory = ShellPrompt
  28.